home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 44
/
Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso
/
-in_the_mag-
/
basics
/
amos
/
ap_gui.lha
/
master.AMOS
/
master.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1996-05-27
|
2KB
|
108 lines
'Here's the source to the Master GUI program. It's far from perfect, but
'I threw it together in a day. There is a bug somewhere so you have to select
'an option two times for it to work :(
'ahapp@top.monad.net
Amos To Back
Global GAD,M,A,A$,SHIELD,AA,ANSWER
'Load "WORK:AMOS_PRO/cool.abk",20
Extension_24_02DC
Extension_24_0018 1,1,20 : Extension_24_02C6
'startup:
If Arexx Exist("AREXX")=0
Exec "RexxMast"
If Arexx Exist("AREXX")=0
Print "AREXX not installed on this machine!"
Bell : Stop
End If
End If
Arexx Open "AMOSTCP"
Every 1 Proc _DOGUI
_WAIT_MESSAGE
Procedure _WAIT_MESSAGE
Do
If Arexx
Print "AREXX message: ";Arexx$(0)
If ANSWER=1
Trap Arexx Answer 0,Str$(AA)
End If
End If
Loop
End Proc
Trap Arexx Answer 0,"Bye bye!"
Arexx Close
Procedure CHECK_MENU
M= Extension_24_0060(3)
'M1=Gui Menu(4)
If M=1
AA=1
ANSWER=1
Bell 15
Trap Arexx Answer 0,Str$(AA)
End If
If M=2
AA=2
ANSWER=1
Bell 15
Trap Arexx Answer 0,Str$(AA)
'beep
End If
If M=3
AA=3
ANSWER=1
Bell 15
Trap Arexx Answer 0,Str$(AA)
'crash
End If
If M=4
AA=4
ANSWER=1
Bell 15
Trap Arexx Answer 0,Str$(AA)
'led flash
End If
If M=5
SHIELD=1
Bell 15
Trap Arexx Answer 0,Str$(AA)
'shield
End If
ANSWER=0
End Proc
Procedure SHUTDOWN
RESULT= Extension_24_0032(1)
System
End Proc
Procedure CRASH
If SHIELD=0
Say "Hasta la vista, baby."
Do
Inc HEHE
Poke HEHE,Rnd(255)
Loop
End If
If SHIELD=1
Say "You are safe!"
End If
End Proc
Procedure _DOGUI
_VALUE= Extension_24_0042
If _VALUE=0
Led On
End If
If _VALUE=1
Led Off
End If
GAD= Extension_24_0024
If GAD=-1
'pressed close button
SHUTDOWN
End If
If GAD=-2
CHECK_MENU
End If
Every On
End Proc